package com.youzi.mdtool.util;

/**
 * 返回结果
 * @author ：Andrew.Song
 * @Date : 2018-8-27 17:55
 */
public class R {

    public static final int SUCCESS = 200;
    public static final int ERROR = 999;

    public int code;

    public String msg;

    public Object object;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getObject() {
        return object;
    }

    public void setObject(Object object) {
        this.object = object;
    }

    public R() {
    }

    public R(int code) {
        this.code = code;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("R{");
        sb.append("code=").append(code);
        sb.append(", msg='").append(msg).append('\'');
        sb.append(", object=").append(object);
        sb.append('}');
        return sb.toString();
    }
}
